﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace BP.WF.CCFast.Third.GoView
{
    public class GoviewProjectVo : ISerializable
    {

        public string id { get; set; }
        public string projectName { get; set; }
        public string createTime { get; set; }
        public string createUserId { get; set; }
        public string indexImage { get; set; }
        public string remarks { get; set; }
        public string content { get; set; }
        public string templateID { get; set; }
        public int state { get; set; }
        public int isDelete { get; set; }
        public int isTemplate { get; set; }

        // 默认构造函数
        public GoviewProjectVo() { }

        // 用于反序列化
        protected GoviewProjectVo(SerializationInfo info, StreamingContext context)
        {
            id = info.GetString("id");
            projectName = info.GetString("projectName");
            createTime = info.GetString("createTime");
            createUserId = info.GetString("createUserId");
            indexImage = info.GetString("indexImage");
            remarks = info.GetString("remarks");
            content = info.GetString("content");
            templateID = info.GetString("templateID");

            state = info.GetInt32("state");
            isDelete = info.GetInt32("isDelete");
            isTemplate = info.GetInt32("isTemplate");
        }

        // 实现 ISerializable 接口的方法
        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValue("id", id);
            info.AddValue("projectName", projectName);
            info.AddValue("state", state);
            info.AddValue("isDelete", isDelete);
            info.AddValue("isTemplate", isTemplate);
            info.AddValue("createTime", createTime);
            info.AddValue("createUserId", createUserId);
            info.AddValue("indexImage", indexImage);
            info.AddValue("remarks", remarks);
            info.AddValue("content", content);
            info.AddValue("templateID", templateID);
        }
    }
}
